package com.dhcc.bpm.modules.cost.mapper;

import com.dhcc.bpm.modules.cost.entity.CostRule;
import com.dhcc.bpm.modules.cost.vo.CostRuleVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName CostRuleMapper.class
 * @Description  收费规则表 Mapper 接口
 * @Author xiaFaYu
 * @Date 2019-12-16 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
public interface CostRuleMapper extends BaseMapper<CostRule> {

	/**
	 * @Description 自定义分页
	 * @Author xiafayu
	 * @Date 2020/2/24 15:06
	 * @param page
	 * @param costRule
	 * @return java.util.List<com.dhcc.bpm.modules.cost.vo.CostRuleVO>
	 **/
	List<CostRuleVO> selectCostRulePage(IPage page, CostRuleVO costRule);

	/**
	 * @Description 查询
	 * @Author xiafayu
	 * @Date 2020/2/24 15:07
	 * @param productId
	 * @return com.dhcc.bpm.modules.cost.vo.CostRuleVO
	 **/
    CostRuleVO selectByProductId(Long productId);

    /**
     * @Description 查询
     * @Author xiafayu
     * @Date 2020/2/24 15:07
     * @param apiId
     * @return com.dhcc.bpm.modules.cost.vo.CostRuleVO
     **/
	CostRuleVO selectByApiId(Long apiId);

	/**
	 * @Description 配置状态更新
	 * @Author xiafayu
	 * @Date 2020/2/24 15:07
	 * @param
	 * @return boolean
	 **/
	boolean updateRefreshStatus();

	/**
	 * @Description 根据apiIds获得批量收费设置列表
	 * @Author xiafayu
	 * @Date 2020/2/24 15:07
	 * @param ids
	 * @return java.util.List<com.dhcc.bpm.modules.cost.vo.CostRuleVO>
	 **/
    List<CostRuleVO> getListByIds(@Param("ids") List<Long> ids);
}
